import { default as request, cloud } from '@/framework/utils/request'

/**
 * 分页查询有权限的商户基本信息
 */
export function getPage(params) {
  return request({
    url: `${cloud.unifiedPayment}/payMerchant/getAuthPayMerchantPage`,
    method: 'get',
    params
  })
}

/**
 * 根据商户名称模糊查询有权限的商户列表
 */
export function qryAuthMerchantByName(merchantName) {
  return request({
    url: `${cloud.unifiedPayment}/payMerchant/qryAuthMerchantByName`,
    method: 'get',
    params: {
      merchantName
    }
  })
}

/**
 * 修改商户启用状态
 */
export function editMerchantState(data) {
  return request({
    url: `${cloud.unifiedPayment}/payMerchant/editMerchantState`,
    method: 'post',
    data
  })
}

/**
 * 获取商户基本信息单条数据详情
 */
export function getDetail(id) {
  return request({
    url: `${cloud.unifiedPayment}/payMerchant/payMerchantDetail`,
    method: 'get',
    params: {
      id
    }
  })
}
